/*
 * @Description: 组织/用户菜单
 * @Author: oooh
 * @Date: 2024-04-16 14:23:46
 * @LastEditors: oooh
 * @LastEditTime: 2024-04-22 17:17:17
 * @FilePath: \Civil_Servant_Performance_PC\src\api\work\work-plan\index.js
 */
import request from '@/utils/request'

// 查询
export function list(query) {
  return request({
    url: '/api/deptWorkPlans',
    method: 'get',
    params: query
  })
}
// 新增
export function add(data) {
  return request({
    url: '/api/deptWorkPlans',
    method: 'post',
    data: data
  })
}
// 修改
export function update(data) {
  return request({
    url: '/api/deptWorkPlans',
    method: 'put',
    data: data
  })
}
// 详情
export function detail(query) {
  return request({
    url: '/api/deptWorkPlans/' + query.id,
    method: 'get'
  })
}
// 删除
export function remove(query) {
  return request({
    url: '/api/deptWorkPlans/' + query.id,
    method: 'delete'
  })
}
// 撤回工作计划
export function revocation(data) {
  return request({
    url: '/api/deptWorkPlans/recalls/' + data.id,
    method: 'patch'
  })
}
// 审批工作计划
export function audit(data) {
  return request({
    url: '/api/deptWorkPlans/audits',
    method: 'patch',
    data: data
  })
}
